home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / srdsk204.zip / SRDISK.DOC < prev    next >
Text File  |  1993-05-19  |  35KB  |  892 lines

  1.  
  2.                               SRDISK (TM)
  3.                     ReSizeable RAMDisk version 2.04
  4.                          for XMS and EMS memory
  5.  
  6.                  Copyright (c) 1991-1993 Marko Kohtala
  7.                           All rights reserved
  8.  
  9.  
  10.  
  11. CONTENTS
  12.  
  13.   1. Disclaimer of warranty
  14.   2. License
  15.   3. Features included
  16.   4. Files in this release
  17.   5. Usage
  18.   5.1. Basic installation
  19.   5.2. SRDISK device driver
  20.   5.2.1. XMS memory device driver
  21.   5.2.2. EMS memory device driver
  22.   5.2.3. EMS 3.2 memory device driver
  23.   5.3. SRDUMMY device driver
  24.   5.4. SRDISK program
  25.   5.4.1 SRDISK sample commands
  26.   5.4.2 SRDISK command line options
  27.   6. Troubleshooting
  28.   7. Trademarks
  29.   8. Last words
  30.  
  31.  
  32.  
  33.                        1. DISCLAIMER OF WARRANTY
  34.  
  35. THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS 
  36. TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER 
  37. EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE 
  38. ENVIRONMENTS IN WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS 
  39. FOR A PARTICULAR PURPOSE IS OFFERED.
  40.  
  41. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY
  42. TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.  THE USER MUST
  43. ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE
  44. SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF
  45. PURCHASE PRICE.
  46.  
  47.  
  48.  
  49.                                2. LICENSE
  50.  
  51. This software is NOT public domain. It is copyrighted software
  52. distributed as shareware.
  53.  
  54. This software is NOT free. A license fee must be paid if used longer 
  55. than for one month evaluation period. See PAYMENT.DOC for details of the 
  56. payment.
  57.  
  58. If you received this software on a CD-ROM or from a disk vendor, you 
  59. have only paid for the disk. You do NOT have a license to use this 
  60. software.
  61.  
  62. Everybody has the right to copy and distribute this software as long as
  63. it is unmodified and all the original files listed in chapter 4 of this 
  64. document are included. A fee of at most $7 may be charged for the total 
  65. expences of copying. If a copying fee is taken, the receiver of this 
  66. software must be made aware that he has only the evaluation and copying 
  67. license stated above.
  68.  
  69. Remember that you may COPY THIS TO YOUR FRIENDS! This is the idea behind 
  70. shareware. Show this to your boss also (not meaning: if you do not count 
  71. him/her to your friends <g>). SRDISK can prove worth a few megabytes of 
  72. memory to you.
  73.  
  74.  
  75.  
  76.                           3. FEATURES INCLUDED
  77.  
  78. This RAM disk currently supports the following features:
  79.  
  80.   * Compatible with MS-DOS versions from 3 to 6 and DR-DOS 5 to 6.
  81.   * XMS - Extended memory on 286 and up with HIMEM or other XMS 2.0
  82.     driver.
  83.   * EMS - Expanded memory of LIM/EMS version 3.2 and 4.0.
  84.   * Device drivers may be chained to form larger disks using many
  85.     different kind memories.
  86.   * Resizeable - can preserve disk contents if new format has room 
  87.     enough.
  88.   * Removable. Can be disabled without reboot.
  89.   * Supports 32-bit sector addressing introduced in DOS 4. Thus over 32M
  90.     RAM disks are possible if you have the memory.
  91.   * Configurable
  92.       - sector size
  93.       - cluster size
  94.       - root directory entry count
  95.       - number of FATs
  96.   * Predefined DOS and FDFORMAT floppy disk look-alike formats.
  97.   * DISKCOPY compatible with DOS versions from 3.20 up. You can copy
  98.     to/from SRDISK drive using DOS DISKCOPY.
  99.   * Write protection.
  100.   * Can optionally set environment variables SRDISKn (n=1,2,...) to
  101.     the installed SRDISK drive letters.
  102.   * Comes with a dummy drive you can use to locate SRDISK (or any other 
  103.     installable) drive at a higher letter.
  104.  
  105. I have a list of new features to implement in the future. By sending 
  106. money and feature suggestions you can help me make this program still 
  107. better.
  108.  
  109. Users may find that the ability to resize is invaluable. Since some 
  110. programs can take best use of memory by directly using it while others 
  111. need a fast disk for temporary files, you can now have optimal 
  112. performance with both kinds of programs without the trouble of changing 
  113. configuration and rebooting.
  114.  
  115. The feature of being able to resize automagically when there is need for 
  116. it is currently not in my reach. FAT filesystem in DOS just was not 
  117. designed for it. There is some more explanation about it later in this 
  118. document.
  119.  
  120.  
  121.  
  122.                         4. FILES IN THIS RELEASE
  123.  
  124. The following files are distributed in this release:
  125.  
  126.         READ.ME         some notes
  127.         SRDISK.DOC      this document
  128.         SUOMI.DOC       Finnish version of this document
  129.         SRDXMS.SYS      device driver for XMS memory
  130.         SRDXMSS.SYS     device driver for XMS memory (small version)
  131.         SRDEMS.SYS      device driver for EMS 4.0 memory
  132.         SRDEMSS.SYS     device driver for EMS 4.0 memory (small version)
  133.         SRDEMS3.SYS     device driver for EMS 3.2 memory
  134.         SRDUMMY.SYS     device driver for nothing but use drive letters
  135.         SRDISK.EXE      formatter program
  136.         PAYMENT.DOC     registering information
  137.         WHATSNEW.DOC    what is new in this release and history
  138.         FILE_ID.DIZ     short description of packet for BBS operators
  139.  
  140. The small versions of device drivers do not support DOS DISKCOPY 
  141. compatibility and may require user to make sure there is enough stack 
  142. available by specifying STACKS=8,512 (or similar) in CONFIG.SYS. Also, 
  143. you can not chain another device driver after a small version device 
  144. driver.
  145.  
  146.  
  147.  
  148.                                 5. USAGE
  149.  
  150. The SRDISK is basicly split into two parts:
  151.  
  152.         1) a device driver to add the virtual drive into DOS and
  153.         2) a program to control the device driver
  154.  
  155. The following explains the installation and how to use both of these
  156. parts.
  157.  
  158.  
  159.                         5.1. BASIC INSTALLATION
  160.  
  161. The basic installation for XMS memory can be done following these steps:
  162.  
  163. 1. Copy SRDXMS.SYS into you root directory.
  164.  
  165. 2. Copy SRDISK.EXE into some directory in your PATH.
  166.  
  167. 3. Make sure you have HIMEM.SYS or some other XMS driver installed
  168.    in CONFIG.SYS before the following step.
  169.  
  170. 4. Add into your CONFIG.SYS line
  171.  
  172.         DEVICE=SRDXMS.SYS
  173.  
  174. 5. Add into your AUTOEXEC.BAT after the PATH command line
  175.  
  176.         SRDISK <size>
  177.  
  178. The <size> defines the disk size in Kbytes.
  179.  
  180. If you have EMS memory, then use file SRDEMS.SYS in place of SRDXMS.SYS 
  181. and make sure EMS 4.0 device driver is installed in CONFIG.SYS before 
  182. the SRDEMS.SYS.
  183.  
  184. The device driver adds into DOS a new disk drive. Before you run
  185. SRDISK.EXE or when you set the disk size to zero, the new disk drive
  186. behaves as if you have a floppy drive without a floppy inserted.
  187.  
  188.  
  189.                        5.2. SRDISK DEVICE DRIVER
  190.  
  191. For a RAM disk you need a device driver. This device driver supplies a 
  192. storage for an array of sectors which DOS uses to store all the data. 
  193. SRDISK comes with separate drivers for storing the sectors in XMS 
  194. (extended memory managed by HIMEM.SYS or other XMS driver) and in EMS 
  195. memory.
  196.  
  197. Most often you do not need any parameters for the device drivers, but 
  198. the driver accepts two parameters:
  199.  
  200.         DEVICE=SRDmmm.SYS [d:] [/A]
  201.  
  202. The [] around the parameter mean it is optional; you must not type the
  203. brackets.
  204.  
  205. d:      The 'd:' can be used to tell the driver at what letter it is 
  206.         assigned in case DOS does not let it know it.
  207.  
  208.         Another use for 'd:' is to define into what SRDISK drive the 
  209.         current driver is to be appended.
  210.  
  211.         If you need to have SRDISK at some specific drive letter, you 
  212.         can use SRDUMMY.SYS. Note though, that drive letters are always 
  213.         used in order from A to Z and you can only use up a few drives 
  214.         before the letter you want to use.
  215.  
  216. /A      This tells the driver to append itself to the previously 
  217.         installed SRDISK device driver. The memory accessed using this 
  218.         driver is then available as extra memory to the previously 
  219.         installed SRDISK drive.
  220.  
  221.         If you want the low part of your disk to use XMS and the high 
  222.         part EMS memory, you can put these two lines into your 
  223.         CONFIG.SYS
  224.  
  225.                 DEVICE=SRDXMS.SYS
  226.                 DEVICE=SRDEMS.SYS /A
  227.  
  228.         For this to work, the first device driver must have the extra 
  229.         code to look into the next driver for more memory. Therefore the 
  230.         first device driver must not be the small version SRDXMSS.SYS or 
  231.         SRDEMSS.SYS.
  232.  
  233. Merely installing the driver gives you no RAM disk. It is as if you had 
  234. installed a floppy drive without putting a disk in the drive. For that 
  235. you need the SRDISK.EXE program.
  236.  
  237. The following chapters give some explanation about the different memory 
  238. types and explains reasons for the problems there are.
  239.  
  240.  
  241.                     5.2.1. XMS MEMORY DEVICE DRIVER
  242.  
  243. 8088 processor instruction set can only access memory at addresses from 
  244. 0 to 1048575 (1 megabyte) and memory above the address 1048575 is called 
  245. extended memory. i80286 had a new mode (protected mode) where the 
  246. instructions had a little different meanings and could be used to 
  247. address memory above the 1 megabyte limit.
  248.  
  249. XMS (eXtended Memory Specification) is a means to control the usage of 
  250. extended memory between applications so that each application can have 
  251. exclusive access to some range of addresses without fear the other 
  252. application would be using the same memory for its own purposes.
  253.  
  254. When SRDISK (or any other XMS client) needs extended memory, it requests 
  255. it from extended memory manager (EMM) that follows the eXtended Memory 
  256. Specification. Most common and free such memory manager is HIMEM.SYS.
  257.  
  258. The EMM then tries to find available memory block (a contiguous range of 
  259. addresses available) that is as large or larger than the requested 
  260. memory block. If all of the available blocks are smaller than the 
  261. requested size, the request fails even if the available blocks would be 
  262. large enough when combined.
  263.  
  264. Since DOS and DOS programs still run in the 8088 mode where instructions 
  265. can not address memory beyond 1 megabyte limit, there is no way for them 
  266. to access the memory directly. XMS also defines service to copy memory 
  267. to and from the memory beyond the 1 megabyte limit.
  268.  
  269.  
  270.                     5.2.2. EMS MEMORY DEVICE DRIVER
  271.  
  272. Since 8088 could only address memory up to 1 megabyte, any memory added 
  273. had to be made to use the same addresses with already existing memory. 
  274. Some new hardware had to be added so that the memory occupying a range 
  275. of addresses could be switched with another block of memory. 
  276. Lotus/Intel/MicroSoft Expanded Memory Specification (LIM EMS) was 
  277. developed to provide standardized access to this memory for much the 
  278. same reason XMS was developed to provide access to extended memory.
  279.  
  280. EMS uses a 64K memory area divided into four separate 16K windows to 
  281. access the expanded memory. These windows show different 16K blocks of 
  282. EMS memory (called pages) as requested by the application.
  283.  
  284. EMS memory can also be simulated very efficiently with 386 virtual 
  285. memory. For example EMM386 uses this method to convert extended memory 
  286. into expanded memory.
  287.  
  288. Since EMS memory is consisted of separate 16K pages, there is no 
  289. requirement to have the allocated memory be in contiguous blocks as with 
  290. XMS memory. Since all the available memory can be allocated, you can 
  291. better predict how much memory you can allocate.
  292.  
  293.  
  294.                     5.2.3. EMS 3.2 MEMORY DEVICE DRIVER
  295.  
  296. EMS 3.2 is an older version of EMS. 4.0 is the currently most used one.
  297.  
  298. The main reason SRDISK has version 3.2 driver is that MS-Windows 3.1 has 
  299. a serious bug in the EMS protection it uses. Basicly with the EMS 3.2 
  300. driver you can access EMS disk that has been allocated before starting 
  301. MS-Windows but not one that is allocated inside DOS window. With the EMS 
  302. 4.0 driver you can not access memory allocated before starting 
  303. MS-Windows but can well access memory that is allocated inside DOS 
  304. window.
  305.  
  306. In any case, MS-Windows will not allow any other process access the 
  307. disk allocated in another process.
  308.  
  309.  
  310.                        5.3. SRDUMMY DEVICE DRIVER
  311.  
  312. SRDUMMY.SYS can be used to force installable device drivers to some 
  313. specific drive letters. To better understand what for you might need it, 
  314. read the following paragraph.
  315.  
  316. DOS allocates drives in order from A to Z. The first drives A and B are 
  317. always used for floppy drives. If you have hard disks, drives from C up 
  318. are allocated to them by DOS before CONFIG.SYS is loaded. After all the 
  319. standard hardware drives have been assigned, DOS reads the CONFIG.SYS 
  320. and loads the devices found there. Each block device driver (a device 
  321. supplying only an array of blocks of data, like SRDISK) is assigned one 
  322. or more drive letters in the order they are in CONFIG.SYS. The device 
  323. drivers can not determine to which drives they get assigned.
  324.  
  325. SRDUMMY.SYS tells DOS it provides one or more block devices and thus 
  326. uses up some drive letters. There will not be any drives though, and if 
  327. you access the drives, you'll get the drive not ready error.
  328.  
  329. SRDUMMY.SYS takes one parameter: The drive letter the next block device 
  330. should be loaded to.
  331.  
  332. Take a look at the following sample CONFIG.SYS:
  333.  
  334.         DEVICE=SRDXMS.SYS
  335.         DEVICE=SRDUMMY.SYS G:
  336.         DEVICE=SRDEMS.SYS
  337.  
  338. If you have one hard disk, the floppies and hard disk use letters A-C. 
  339. SRDXMS.SYS is then loaded to D and SRDUMMY.SYS uses drives E and F.
  340. SRDEMS.SYS loads thus at G.
  341.  
  342. If you add a second hard drive, it will take drive letter D and 
  343. SRDXMS.SYS will then be at E and SRDUMMY.SYS use only drive F putting
  344. SRDEMS.SYS to G again.
  345.  
  346. If you add a few more drives so that drive G is already in use before 
  347. SRDUMMY.SYS gets loaded, you will only get a warning message from 
  348. SRDUMMY.SYS and the SRDEMS.SYS will load at the next available drive 
  349. letter.
  350.  
  351. DR-DOS 6 seems not to allow access to drive letters after P: even with 
  352. LASTDRIVE=Z statement in CONFIG.SYS. So with DR-DOS you must avoid using 
  353. the last drive letters after P:.
  354.  
  355.  
  356.                           5.4. SRDISK PROGRAM
  357.  
  358. The disk can be enabled by, for example, using command "SRDISK 1024"
  359. which will make first SRDISK a 1024K disk. It can be disabled by making
  360. it of size 0: "SRDISK 0".
  361.  
  362. You should include the command to enable the RAM disk into your
  363. AUTOEXEC.BAT file.
  364.  
  365. The SRDISK.EXE is self documented. You'll get the documentation by
  366. typing at the DOS prompt "SRDISK /?" and hitting enter. To get a hang of
  367. it better, some examples with explanations are given below.
  368.  
  369.  
  370.                      5.4.1. SRDISK SAMPLE COMMANDS
  371.  
  372. Command
  373.  
  374.         SRDISK 1024
  375.  
  376. creates or changes the old disk to a 1024K (= 1M) disk.
  377.  
  378. More precisely it calculates various disk parameters as it best sees fit
  379. for most users needs. Those disk parameters can be defined by user on
  380. the command line if the calculated values do not meet his needs. After
  381. the parameters have been calculated, the memory (1024K = 1M) needed for
  382. the disk is allocated and a disk image is created into the memory.
  383.  
  384. The calculated parameters include sector size, cluster size, number of
  385. FATs and root directory size.
  386.  
  387. - Sector is the basic unit of storage. It's size does not mean much, but
  388.   it has to be a power of 2 and no larger than 512 bytes.
  389.  
  390. - Cluster size tells in how large blocks the space is allocated. Larger
  391.   clusters mean smaller FAT (= File Allocation Table), but then even the
  392.   smallest file always takes at least that much space. Cluster can not
  393.   be smaller than one sector. A cluster is a collection of sectors.
  394.  
  395. - FAT is the table that holds information about each allocation unit,
  396.   cluster, on the disk. The information can be indication that the
  397.   cluster is free, or where the next cluster of the file is or that the
  398.   cluster is unusable. A disk only needs one FAT - though multiple
  399.   copies of it can be specified. Note that the other FATs are only
  400.   copies of the first one.
  401.  
  402. - Root directory is limited to hold only some predefined number of
  403.   files. If you get "Can not create file" errors while there is plenty
  404.   of free space on disk, you need to make the root directory larger.
  405.   Alternatively you should create a subdirectory and create the files
  406.   there. Subdirectories can be arbitrarily large.
  407.  
  408. If there is data on the disk to be preserved, sector and cluster size 
  409. are not changed.
  410.  
  411. Command
  412.  
  413.         SRDISK 1024 /O
  414.  
  415. does the same as the command 'SRDISK 1024' except the various disk
  416. parameters are not calculated but instead the old parameters are used.
  417.  
  418. Command
  419.  
  420.         SRDISK /F:1440
  421.  
  422. tries to create the disk to look like a real floppy disk. It also 
  423. defines some parameters that otherwise have no effect like media 
  424. descriptor, number of heads and sectors per track. These parameters have 
  425. no other function but to make it look like it is a real, physical disk - 
  426. which it is not. SRDISK drives are not accessible through BIOS, so some 
  427. diskcopy and utility programs can fail if used with SRDISK.
  428.  
  429. Command
  430.  
  431.         SRDISK /S:256 /C:1024 /D:64
  432.  
  433. reformats the disk. The size is determined by the old size of the disk
  434. even without the use of /O. Sector size is changed to 256 bytes, cluster
  435. size to 1024 bytes (two sectors) and root directory will hold 64 entries
  436. (one of which is used for the volume label).
  437.  
  438. Command
  439.  
  440.         SRDISK /U
  441.  
  442. clears the disk. It recalculates the format and makes it better if 
  443. possible, but preserves the disk size. Without this switch, the disk 
  444. contents are preserved if possible. This is also usefull if you can not 
  445. resize the disk because of errors on it -- using this option the errors 
  446. will be ignored and the disk is made whole new.
  447.  
  448. Command
  449.  
  450.         SRDISK E:
  451.  
  452. tests if E is a SRDISK RAMdisk and, as no format is defined, display
  453. it's current configuration. The letter may not correspond to the letter
  454. known by DOS for the drive if the letter is defined wrong when
  455. installing the SRDISK.SYS device driver in CONFIG.SYS.
  456.  
  457. Command
  458.  
  459.         SRDISK
  460.  
  461. without the drive letter specified tries to determine the drive by first
  462. trying the current drive and if it is not a SRDISK drive, then the first
  463. SRDISK drive loaded in CONFIG.SYS. As no change in the format is
  464. defined, the current configuration of the found drive are displayed.
  465.  
  466.  
  467.                    5.4.2. SRDISK COMMAND LINE OPTIONS
  468.  
  469. To ease remembering the command line options, SRDISK has for some 
  470. settings several different options. Many of the options are long, but 
  471. you can truncate them if you write enough for SRDISK to identify the 
  472. option unambiguously.
  473.  
  474. An exact match in the full lenght of the option is always identified 
  475. instead of some another option that begins with the same characters.
  476.  
  477. All numeric parameters for the options are translated using the C 
  478. language rules: Number starting with 0 is octal number (base eight) and 
  479. with 0x is hexadecimal (base 16), others are decimal.
  480.  
  481. The options in alphabetical order are
  482.  
  483.   /?               List of most important command line options
  484.   /A:n             Number of FAT copies (1 or 2)
  485.   /ASK             Ask for confirmation if data would be lost
  486.   /AVAILABLE:n     Resize to disk to have n Kbytes of space available
  487.   /C:n             Cluster size
  488.   /CLUSTER:n       Same as /C
  489.   /D:n             Dir entries
  490.   /DEVICETYPE:n    Device type for DISKCOPY compatibility
  491.   /DIRENTRIES:n    Same as /D
  492.   /DOSFORMAT:n     DOS or FDFORMAT lookalike format
  493.   /E               Set environment variables SRDISKn
  494.   /ENVIRONMENT     Same as /E
  495.   /ERASE           Clear disk contents, implies /FORCE
  496.   /F:n             Same as /DOSFORMAT
  497.   /FATS:n          Same as /A
  498.   /FILESPACE:n     Make the disk have n Kbytes space for files
  499.   /FORCE           Destroy data if necessary to force new format
  500.   /FREEMEM:n       Determine disk size to leave at least n Kbytes mem free
  501.   /H               Same as /?
  502.   /HEADS:n         Number of heads for DISKCOPY compatibility
  503.   /HELP            Same as /?
  504.   /M:n[:n...]      Max sizes for different drivers chained to a drive
  505.   /MAXSIZE         Allocate the disk as large as it can safely be allocated
  506.   /MEDIA:n         Media ID byte for DISKCOPY compatibility
  507.   /MINSIZE         Alias to /AVAILABLE:0, minimize the disk
  508.   /NO              NO, do not destroy data to complete new format
  509.   /O               Use old disk format where not redefined
  510.   /OLD             Same as /O
  511.   /REGISTER        Display registration information
  512.   /S:n             Sector size (128, 256 or 512 bytes)
  513.   /SECTORS:n       Number of sectors per track
  514.   /SECTORSIZE:n    Same as /S
  515.   /SIDES:n         Same as /HEADS
  516.   /SPT:n           Same as /SECTORS
  517.   /U               Same as /ERASE, FORMAT compatible
  518.   /UNCONDITIONAL   Same as /ERASE /FORCE
  519.   /V:n             Verbose level (1-5) to control amount of output
  520.   /VERBOSE:n       Same as /V
  521.   /W:x             Write protection x is ON/+ or OFF/-
  522.   /WRITEPROTECT:x  Same as /W
  523.   /Y               Same as /FORCE
  524.   /YES             Same as /FORCE
  525.  
  526. The options by function
  527.  
  528.   /? /H /HELP
  529.  
  530.         List the most important command line options and exit.
  531.  
  532.   /A:n /FATS:n
  533.  
  534.         Number of FAT copies (1 or 2). You need only one FAT unless you 
  535.         need to make the disk look like some floppy disk.
  536.  
  537.   /AVAILABLE:n /MINSIZE
  538.  
  539.         Space available on the disk. The disk size will be counted to be 
  540.         large enough to hold the files already on it and to have n 
  541.         Kbytes of space available.
  542.  
  543.         /MINSIZE is the same as /AVAILABLE:0 and will also make the root 
  544.         directory smaller.
  545.  
  546.   /C:n /CLUSTER:n
  547.  
  548.         Cluster size. Cluster is the unit used to allocate disk space.
  549.         This option has effect on the space used for File Allocation 
  550.         Table. If cluster size is small, bigger FAT is needed and there 
  551.         is less room for files, but files may take more room.
  552.  
  553.   /D:n /DIRENTRIES:n
  554.  
  555.         Root directory entries. FAT file system has fixed size root 
  556.         directory. You can specify the size for it using this option.
  557.  
  558.         Note that each entry is 32 bytes long and a fixed amount of 
  559.         sectors are used to hold the entries. Thus if sector size is 512 
  560.         bytes each sector can hold 16 entries (512 / 32 = 16) and 
  561.         specifying /D:4 or /D:16 uses exactly the same amount of space 
  562.         on the disk: one sector.
  563.  
  564.         If there is nothing against it, I start to round the number of 
  565.         root directory entries up to fill the last root directory 
  566.         sector. Some utility programs can be confused if the last sector 
  567.         is only partially used.
  568.  
  569.   /DEVICETYPE:n
  570.  
  571.         DOS does not care what type the device is, but in case some 
  572.         utility program asks DOS for the type it can be specified with 
  573.         this switch. This is normally set correctly if you use the /F 
  574.         switch. Device types are
  575.  
  576.                 0 = 360K
  577.                 1 = 1.2M
  578.                 2 = 720K
  579.                 3 = 8-inch single-density
  580.                 4 = 8-inch double-density
  581.                 5 = Hard disk
  582.                 6 = Tape drive
  583.                 7 = 1.44M
  584.                 8 = Read/Write optical
  585.                 9 = 2.88M
  586.  
  587.   /E /ENVIRONMENT
  588.  
  589.         Set environment variables SRDISK1, SRDISK2 etc. to the drive 
  590.         letters or SRDISK drives installed. You can then use the 
  591.         variables in batch files to access the RAM disk.
  592.  
  593.         For example:
  594.  
  595.                 REM Set environment variables without much output and
  596.                 REM make a tiny disk at the same time
  597.                 SRDISK /E /V:1 /F:1
  598.                 SET TMP=%SRDISK1%:\TMP
  599.                 MKDIR %TMP%
  600.  
  601.                 IF "%SRDISK2%" == "" ECHO You have only one SRDISK drive
  602.  
  603.   /F:n /DOSFORMAT:n
  604.  
  605.         DOS or FDFORMAT lookalike formats. The number n defines the disk 
  606.         size in Kbytes. This option also sets all the other parameters 
  607.         besides the size to match the corresponding DOS or FDFORMAT 
  608.         created floppy disk.
  609.  
  610.         The currently supported formats are
  611.  
  612.           Size Media Device SPT Head Root
  613.  
  614.            160  FE     360   8   1    64    DOS
  615.            180  FC     360   9   1    64    DOS
  616.            200  FD     360  10   1   112    FDFORMAT
  617.            205  FD     360  10   1   112    FDFORMAT
  618.            320  FF     360   8   2   112    DOS
  619.            360  FD     360   9   2   112    DOS
  620.            400  FD     360  10   2   112    FDFORMAT
  621.            410  FD     360  10   2   112    FDFORMAT
  622.            640  FB     720   8   2   112    DOS
  623.            720  F9     720   9   2   112    DOS
  624.            800  F9     720  10   2   112    FDFORMAT
  625.            820  F9     720  10   2   112    FDFORMAT
  626.           1200  F9     1.2  15   2   224    DOS
  627.           1440  F0    1.44  18   2   224    DOS
  628.           1476  F0    1.44  18   2   224    FDFORMAT
  629.           1600  F0    1.44  20   2   224    FDFORMAT
  630.           1640  F0    1.44  20   2   224    FDFORMAT
  631.           1680  F0    1.44  21   2   224    FDFORMAT
  632.           1722  F0    1.44  21   2   224    FDFORMAT
  633.           2880  F0    2.88  24   2   240    DOS
  634.  
  635.         In addition to these there is a special format 1 to make a mini 
  636.         disk. This can be used if you have your RAM disk in your PATH 
  637.         and do not want to get Drive Not Ready errors when you have 
  638.         freed the memory for RAM disk. Check your memory manager though: 
  639.         some memory managers allocate memory in 16K chunks and a 1K disk 
  640.         uses as much memory as a 16K disk does.
  641.  
  642.   /FILESPACE:n
  643.  
  644.         Space available for files. The disk will be larger than n 
  645.         Kbytes, since file allocation table and root directory always 
  646.         take some space too.
  647.  
  648.         Note that files usually take some extra space because the space 
  649.         for them is allocated in clusters. For example, if cluster size 
  650.         is 1024 bytes (1K), any file this long or smaller (but not 0 
  651.         bytes) will use one cluster and thus 1024 bytes.
  652.  
  653.         Subdirectories also use file space.
  654.  
  655.   /FREEMEM:n /MAXSIZE
  656.  
  657.         Memory available for other programs. The disk will be sized to 
  658.         leave at least n Kbytes of memory to other programs. The disk 
  659.         size may be less than necessary if there is some uncertainty 
  660.         whether or not all the memory can be allocated.
  661.  
  662.         FOR XMS MEMORY, THIS CAN ALLOCATE LESS THAN THERE IS AVAILABLE 
  663.         SINCE XMS CAN NOT RELIABLY PUT ALL FREE MEMORY IN ONE BLOCK. 
  664.         ALSO, SINCE SOME MEMORY MANAGERS ALLOCATE MEMORY IN BLOCKS OF 4 
  665.         OR 16 KBYTES, THERE MIGHT BE 15 KBYTES LESS FREE MEMORY THAN 
  666.         REQUESTED.
  667.  
  668.         The disk can also be disabled if more free memory is requested 
  669.         than there is available.
  670.  
  671.         /MAXSIZE is same as /FREEMEM:0, thus using all safely available 
  672.         memory for the disk.
  673.  
  674.         If some program of yours needs free memory and you do not care 
  675.         for disk contents, you can put for example
  676.  
  677.                 SRDISK /FREEMEM:1024 /YES
  678.  
  679.         into a batch file to start to program. The /YES gives permission 
  680.         to clear the disk if the disk can not be made small enough 
  681.         otherwise.
  682.  
  683.   /HEADS:n /SIDES:n
  684.  
  685.         Number of heads for DISKCOPY compatibility. This is normally set 
  686.         correctly if you use the /F switch.
  687.  
  688.   /M:n[:n...]
  689.  
  690.         Max sizes for different drivers chained to a drive.
  691.  
  692.         Normally SRDISK uses as much space as is available on the first 
  693.         driver and only then starts allocating on the second one. If you 
  694.         want to use only up to some amount of memory on the different 
  695.         drivers chained to one drive, you can define the amounts with 
  696.         this option.
  697.  
  698.         For example to define first driver use only 100K of memory, give 
  699.         command
  700.  
  701.                 SRDISK /M:100
  702.  
  703.         If you would have three or more drivers chained into one drive, 
  704.         you could define first and third to use 100K and let the other 
  705.         drivers use as much as they were allowed to use before with 
  706.         command
  707.  
  708.                 SRDISK /M:100::100
  709.  
  710.   /MEDIA:n
  711.  
  712.         Media ID byte for DISKCOPY compatibility. This is normally set 
  713.         correctly if you use the /F switch.
  714.  
  715.         Use Media IDs in the range from 0xF0 to 0xFF. Smaller values 
  716.         make CHKDSK report that it is possibly non-DOS format media.
  717.  
  718.   /O /OLD
  719.  
  720.         Use old disk format where not explicitly redefined with command
  721.         line options.
  722.  
  723.   /REGISTER
  724.  
  725.         Displays the registration information.
  726.  
  727.   /S:n /SECTORSIZE:n
  728.  
  729.         Sector size (128, 256 or 512 bytes). Sector is the basic 
  730.         allocation unit of a disk. Smaller sector size can decrease the 
  731.         amount of memory wasted on boot sector, FAT and root directory, 
  732.         but that is just about the only benefit of it. Clusters are 
  733.         formed of sectors, so sector size can not be larger than cluster 
  734.         size. DOS uses by default 512 bytes per sectors.
  735.  
  736.   /SECTORS:n /SPT:n
  737.  
  738.         Number of sectors per track for DISKCOPY compatibility. This is 
  739.         normally set correctly if you use the /F switch.
  740.  
  741.   /U /UNCONDITIONAL /ERASE
  742.  
  743.         Clear disk contents. This implies option /YES.
  744.  
  745.         If your disk gets corrupted and SRDISK refuces to reformat it, 
  746.         try this switch. SRDISK should not then care about the current 
  747.         disk, but rather just wipes it off and creates a new one.
  748.  
  749.   /V:n /VERBOSE:n
  750.  
  751.         Verbose level (1-5) to control amount of output. With /V:1 you 
  752.         can limit the output to the title.
  753.  
  754.   /W:x /WRITEPROTECT:x
  755.  
  756.         Write protection contol. The parameter x can be ON, + or nothing 
  757.         to enable the write protection or OFF or - to disable it.
  758.  
  759.   /Y /YES /FORCE
  760.   /NO
  761.   /ASK
  762.  
  763.         These are to control the need of user intervention.
  764.  
  765.         All questions in SRDISK are formed so that answer YES will give 
  766.         permission to destroy data and continue, while NO will abort the 
  767.         operation and try to preserve the data on the disk. By these 
  768.         options you can give the answer on the command line.
  769.  
  770.         /ASK is the default and means the user will be prompted to make 
  771.         choise.
  772.  
  773.  
  774.  
  775.                            6. TROUBLESHOOTING
  776.  
  777. Causes of grief
  778.  
  779. 1. RAM disks loose their contents when power is turned off! Do not store
  780. anything valuable there.
  781.  
  782. 2. There is no XMS nor EMS memory without a proper device driver. 
  783. HIMEM.SYS will do for XMS. For EMS you need to install the device driver 
  784. that came with your expanded memory hardware. QEMM can supply both on 
  785. 386 or better hardware and you might be better off using the SRDEMS 
  786. driver with it.
  787.  
  788. 3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS versions 
  789. 2.78 and later should be good. Also these later versions may be limited 
  790. to 128000K blocks; solution is to link two (or more) SRDXMS.SYS drivers 
  791. (i.e. add "DEVICE=SRDXMS.SYS /A" line to CONFIG.SYS) and limit the first 
  792. one with command "SRDISK /M:128000". This will only break the /MAXSIZE 
  793. option.
  794.  
  795. 4. DR-DOS 5 HIDOS.SYS does not implement the XMS resize function. 
  796. Therefore SRDISK may not be able to resize the disk unless you replace 
  797. the HIDOS.SYS with HIMEM.SYS.
  798.  
  799. 5. Some programs swap themselves for a shell to the ramdisk. If you
  800. change the format of the disk or clear the disk from such program, the
  801. swapped program may not be able to recover and can crash your computer.
  802.  
  803. 6. Some disk caching programs are reported to cache SRDISK too! This can 
  804. cause a system crash and caching a RAM disk is anyway useless. If you 
  805. use a disk cache, please load it before SRDxxx.SYS or tell it explicitly 
  806. not to cache the SRDISK drive.
  807.  
  808. 7. SRDISK needs it's XMS memory in one contiguous area. Therefore if
  809. SRDISK complaints about insufficient memory while you have plenty of it 
  810. free, the reason might be that some other program uses a piece of the
  811. memory in the middle of the available memory. If you have a choise, use 
  812. EMS since it does not (usually) have this problem.
  813.  
  814. 8. There can be problems with XMS memory when not enough of it can be
  815. allocated. This may result in lost disk contents. Also some memory 
  816. managers that provide both XMS and EMS (like QEMM and the EMM386.EXE of 
  817. MS-DOS 6) can fool SRDISK to think there is more memory available than 
  818. there really is if SRDISK uses both XMS and EMS memory for the disk.
  819.  
  820. 9. Some multitasking environments (like MS-Windows) can free the memory 
  821. allocated under them to the RAM disk. This will cause the data to be 
  822. lost and errors in programs that try to access the disk.
  823.  
  824. 10. MS-Windows has buggy memory protection that prevents programs from 
  825. accessing memory allocated in another session. It also prevents using 
  826. EMS memory allocated for the SRDEMS.SYS driver outside Windows and for 
  827. the SRDEMS3.SYS driver inside Windows. In general you may find it better 
  828. to use SRDEMS3.SYS or SRDXMS.SYS and allocate any disk you will use 
  829. before starting Windows and never resize any disk while inside Windows.
  830.  
  831.  
  832.  
  833.                              7. TRADEMARKS
  834.  
  835. Oh, and we should not forget these (I can not verify they are correct, 
  836. but still):
  837.  
  838. QEMM is a trademark of Quartedreck Office Systems Inc.
  839. Microsoft, MS-DOS, SmartDrive and Windows are trademarks of Microsoft 
  840. Corporation. DR-DOS is a trademark of Digital Research Inc. Intel is a 
  841. trademark of Intel Corporation. Lotus is trademark of Lotus Development 
  842. Corporation.
  843.  
  844. FDFORMAT is copyrighted by (and trademark of?) Christoph H. Hockstätter, 
  845. Germany. Nice work.
  846.  
  847. SRDISK is my trademark.
  848.  
  849. If any mentioned trademarks are not included in this list, please tell 
  850. me about them. They are anyway hereby acknowledged.
  851.  
  852.  
  853.  
  854.                              8. LAST WORDS
  855.  
  856. Please, if you know of a way to get around the Windows 3.1 memory 
  857. protection, let me know about it.
  858.  
  859. You can contact me by sending E-mail from
  860.  
  861.         Internet to `Marko.Kohtala@compart.fi'
  862.         CompuServe to `>INTERNET:Marko.Kohtala@compart.fi'
  863.  
  864. If the above address fails (if you do not get a reply, it propably has 
  865. failed), I can still be reached at `Marko.Kohtala@hut.fi'.
  866.  
  867. My surface mail address is
  868.  
  869.         Marko Kohtala
  870.         PL 115
  871.         FIN-01451 Vantaa
  872.         FINLAND
  873.  
  874. You can also call Airline BBS, 24H, HST, V.32, V.42, MNP, +358-0-8725380 
  875. and leave mail at the PRIV area to me, Marko Kohtala (sorry, no 
  876. netmail there). You can also always get the latest release of SRDISK 
  877. from there.
  878.  
  879. If you have access to Fidonet, Bitnet, UUCP mail or just about any 
  880. network, ask your system operator if you can mail to Internet.
  881.  
  882. You can find the latest release of SRDISK in United States, Illinois at
  883.  
  884.         The Midrange System BBS
  885.         Sysop: David Gibbs
  886.         FidoNet: 1:115/439
  887.         Phones: 708-776-1062 and 708-776-1063, both have HST and V.32
  888.         Using Remote Access
  889.  
  890. You can file request latest version using magic file name SRDISK.
  891.  
  892.